package com.trkj.dao.wxy;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojo.ExamArrange;

public interface ExamArrangeDao extends CrudRepository<ExamArrange, Long> {
	@Query(nativeQuery=true,value="select * from EXAM_ARRANGE e where e.CLASS_SJ_NAME like ?1 or e.EP_ID like ?1")
	public List<ExamArrange> queryByeName(String classSjName);
	
	//多表查询分页
	@Query("select r from ExamArrange r ")
	public List<ExamArrange> queryByExamArrange(Pageable p);
	
	//多表查询分页
	@Query("select a,s,e from ExamArrange a inner join a.staffInformations s inner join a.examPapers e")
	public List<Object[]> queryByStaffCjGanl(Pageable p);
	
}
